package cn.south.campus.business.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * <p>
 *
 * </p>
 *
 * @author chow
 * @since 2024/11/1 16:59
 */
@Component
public class TokenConfig {

    @Value("${campus.token.secret}")
    public String secret;

    @Value("${campus.token.expire_time}")
    public int expire;

    @Value("${campus.token.header}")
    public String header;

    public static String SECRET;
    public static int EXPIRE;
    public static String HEADER;

    @PostConstruct
    public void init() {
        SECRET = secret;
        EXPIRE = expire;
        HEADER = header;
    }
}
